package c.e.a.b.g;

import b.i.b.f;
import java.util.Objects;

public class h<TResult> {
    public final a0<TResult> a = new a0();

    public boolean a(Exception exception) {
        a0 a0Var = this.a;
        Objects.requireNonNull(a0Var);
        f.S(exception, "Exception must not be null");
        synchronized (a0Var.a) {
            if (a0Var.c) {
                return false;
            }
            a0Var.c = true;
            a0Var.f = exception;
            a0Var.b.a(a0Var);
            return true;
        }
    }

    public boolean b(TResult tResult) {
        a0 a0Var = this.a;
        synchronized (a0Var.a) {
            if (a0Var.c) {
                return false;
            }
            a0Var.c = true;
            a0Var.e = tResult;
            a0Var.b.a(a0Var);
            return true;
        }
    }
}
